<!----------------------- ADD FRIEND SUCCESSFULLY --------------------------->
<div id="add-friend-success" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-header">
	<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
	<h3 id="myModalLabel">Add friend Successfully</h3>
    </div>
    <div class="modal-body">
	<div class="alert alert-success"><strong>Congratulation!</strong> You have add friend successfully.
	    Please waiting for response of your friend. Click menu setting on top to check out it.
	</div>
    </div>
    <div class="modal-footer">
	<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>	
    </div>
</div>
<div class="wrap-page">
    <div class="tile-page"><strong>List Member</strong></div>   
    <div class="content-page">
	<?php
	$this->widget('bootstrap.widgets.TbGridView', array(
	    'id' => 'post-grid',
	    'dataProvider' => $model->search(user()->id),
	    'filter' => $model,
	    'columns' => array(
		array(
		    'header' => 'Avatar',
		    'type' => 'raw',
		    'value' => function($data) {
			if ($data->avatar) {
			    return '<img src="' . SITE_NAME_URL . 'timthumb.php?src=' . AVATAR_URL . $data->avatar . '&w=100&h=100"/>';
			} else {
			    return '<img src="' . WWW_URL . 'images/Profile_Default_New.png" style="width: 100px; height: 100px;"/>';
			}
		    }
		),
		array(
		    'header' => 'Name',
		    'name' => 'username',
		    'type' => 'raw',
		    'value' => function($data) {
			return '<a href="' . SITE_NAME_URL . 'user/view/id/' . $data->user_id . '">' . $data->username . '</a>';
		    }
		),
		array(
		    'type' => 'raw',
		    'value' => function($data) {
			return $data->checkFriend($data->user_id, $data->display_name);
		    }
		)
	    ),
	));
	?>
    </div>
</div>